Change in openvpn[master]: dco-win: disable DCO for server mode and unsupported driver version
A message that is not in the archive (sent off-list or not yet received): gerrit.1732212459000.Iea4538cee075d50de836d1ef7652985186b2527c@...2715...
Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
to review the following change.
Change subject: dco-win: disable DCO for server mode and unsupported driver version
......................................................................
dco-win: disable DCO for server mode and unsupported driver version
Server mode requires multipeer functionality, which is available starting from dco-win version 2. Disable DCO for older drivers if mode server is specified.
---
M src/openvpn/dco.c
M src/openvpn/dco_win.c
M src/openvpn/dco_win.h
3 files changed, 20 insertions(+), 6 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/12/812/1
src/openvpn/dco.c +10 -6
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -255,18 +259,18 @@return false; } -#if defined(TARGET_FREEBSD ) +#if defined(TARGET_FREEBSD ) || defined(TARGET_WIN32 )if (!proto_is_udp (ce->proto)) { -msg (msglevel,"NOTE: TCP transport disables data channel offload on FreeBSD." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on FreeBSD and Windows." );return false; }#endif #if defined(_WIN32) -if (!ce->remote) +if (!ce->remote && !dco_win_supports_multipeer ()) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -331,9 +335,9 @@ }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer () +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: plaisthos, stipa.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: disable DCO for server mode and unsupported driver version
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
File src/openvpn/dco.c:
http://gerrit.openvpn.net/c/openvpn/+/812/comment/ea6d8bfb_23476f6c :
PS1, Line 262: #if defined(TARGET_FREEBSD) || defined(TARGET_WIN32) This change seems unrelated?
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Fri, 22 Nov 2024 14:33:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: flichtenheld, plaisthos.
stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: disable DCO for server mode and unsupported driver version
......................................................................
Patch Set 1:
(1 comment)
File src/openvpn/dco.c:
http://gerrit.openvpn.net/c/openvpn/+/812/comment/d2548157_0fe4db62 :
PS1, Line 262: #if defined(TARGET_FREEBSD) || defined(TARGET_WIN32)
Quoted 1 line
This change seems unrelated?
I would rather change commit message. The idea of this commit to enable DCO on mode server if the driver version supports it and disable for TCP protocol or unsupported driver version.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Fri, 22 Nov 2024 15:06:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Gerrit-MessageType: comment
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos.
Hello flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review-1 by flichtenheld
Change subject: dco-win: enable mode server on supported configuration
......................................................................
dco-win: enable mode server on supported configuration
Enable dco-win with mode server if driver supports it.
Disable for proto TCP or older drivers.
---
M src/openvpn/dco.c
M src/openvpn/dco_win.c
M src/openvpn/dco_win.h
3 files changed, 20 insertions(+), 6 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/12/812/2
src/openvpn/dco.c +10 -6
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -255,18 +259,18 @@return false; } -#if defined(TARGET_FREEBSD ) +#if defined(TARGET_FREEBSD ) || defined(TARGET_WIN32 )if (!proto_is_udp (ce->proto)) { -msg (msglevel,"NOTE: TCP transport disables data channel offload on FreeBSD." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on FreeBSD and Windows." );return false; }#endif #if defined(_WIN32) -if (!ce->remote) +if (!ce->remote && !dco_win_supports_multipeer ()) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -331,9 +335,9 @@ }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer () +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos.
stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: enable mode server on supported configuration
......................................................................
Patch Set 3:
(1 comment)
File src/openvpn/dco.c:
http://gerrit.openvpn.net/c/openvpn/+/812/comment/06f9bbbe_cf17d39c :
PS1, Line 262: #if defined(TARGET_FREEBSD) || defined(TARGET_WIN32)
Quoted 1 line
I would rather change commit message. […]
Done
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 3
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Fri, 22 Nov 2024 15:56:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>
Comment-In-Reply-To: stipa <[email protected]...>
Gerrit-MessageType: comment
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos.
Hello flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
to look at the new patch set (#4).
Change subject: dco-win: enable mode server on supported configuration
......................................................................
dco-win: enable mode server on supported configuration
Enable dco-win with mode server if driver supports it.
Disable for proto TCP or older drivers.
---
M src/openvpn/dco.c
M src/openvpn/dco_win.c
M src/openvpn/dco_win.h
3 files changed, 27 insertions(+), 7 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/12/812/4
src/openvpn/dco.c +17 -7
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -235,7 +239,7 @@ }static bool -dco_check_option_ce (const struct connection_entry *ce,int msglevel) +dco_check_option_ce (const struct connection_entry *ce,int msglevel,int mode) {if (ce->fragment) {
@@ -264,9 +268,15 @@#endif #if defined(_WIN32) -if (!ce->remote) +if (!proto_is_udp (ce->proto) && mode ==MODE_SERVER ) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on Windows in server mode." ); +return false; + } + +if (!ce->remote && !dco_win_supports_multipeer ()) + { +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -316,7 +326,7 @@const struct connection_list *l = o->connection_list;for (int i =0 ; i < l->len; ++i) { -if (!dco_check_option_ce (l->array[i], msglevel)) +if (!dco_check_option_ce (l->array[i], msglevel, o->mode)) {return false; }
@@ -324,16 +334,16 @@ }else { -if (!dco_check_option_ce (&o->ce, msglevel)) +if (!dco_check_option_ce (&o->ce, msglevel, o->mode)) {return false; } }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer () +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 4
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos, stipa.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: enable mode server on supported configuration
......................................................................
Patch Set 5: Code-Review-1
(1 comment)
File src/openvpn/dco_win.h:
http://gerrit.openvpn.net/c/openvpn/+/812/comment/b4eda8c8_bea9b960 :
PS5, Line 53:
There is a void missing here. MinGW complains
```
dco_win.h:52:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
52 | dco_win_supports_multipeer();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
```--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 5
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Sun, 29 Dec 2024 14:43:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: cron2, flichtenheld, plaisthos, stipa.
Hello cron2, flichtenheld, plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Code-Review-1 by cron2
Change subject: dco-win: enable mode server on supported configuration
......................................................................
dco-win: enable mode server on supported configuration
Enable dco-win with mode server if driver supports it.
Disable for proto TCP or older drivers.
---
M src/openvpn/dco.c
M src/openvpn/dco_win.c
M src/openvpn/dco_win.h
3 files changed, 27 insertions(+), 7 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/12/812/6
src/openvpn/dco.c +17 -7
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -235,7 +239,7 @@ }static bool -dco_check_option_ce (const struct connection_entry *ce,int msglevel) +dco_check_option_ce (const struct connection_entry *ce,int msglevel,int mode) {if (ce->fragment) {
@@ -264,9 +268,15 @@#endif #if defined(_WIN32) -if (!ce->remote) +if (!proto_is_udp (ce->proto) && mode ==MODE_SERVER ) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on Windows in server mode." ); +return false; + } + +if (!ce->remote && !dco_win_supports_multipeer ()) + { +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -316,7 +326,7 @@const struct connection_list *l = o->connection_list;for (int i =0 ; i < l->len; ++i) { -if (!dco_check_option_ce (l->array[i], msglevel)) +if (!dco_check_option_ce (l->array[i], msglevel, o->mode)) {return false; }
@@ -324,16 +334,16 @@ }else { -if (!dco_check_option_ce (&o->ce, msglevel)) +if (!dco_check_option_ce (&o->ce, msglevel, o->mode)) {return false; } }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer (void ) +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (void ); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 6
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-MessageType: newpatchset
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: cron2, flichtenheld, plaisthos.
stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: enable mode server on supported configuration
......................................................................
Patch Set 6:
(1 comment)
File src/openvpn/dco_win.h:
http://gerrit.openvpn.net/c/openvpn/+/812/comment/897bd504_e7979fd0 :
PS5, Line 53:
Quoted 1 line
There is a
voidmissing here. MinGW complains […]
Acknowledged
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 6
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 30 Dec 2024 09:53:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cron2 <[email protected]...>
Gerrit-MessageType: comment
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archiveAttention is currently required from: flichtenheld, plaisthos, stipa.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: enable mode server on supported configuration
......................................................................
Patch Set 6: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 6
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Mon, 30 Dec 2024 19:31:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
PATCH v6 1/1 dco-win: enable mode server on supported configuration
In reply to a message not in the archiveFrom: Lev Stipakov <[email protected]...>
Enable dco-win with mode server if driver supports it.
Disable for proto TCP or older drivers.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/812
This mail reflects revision 6 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/dco.c +17 -7
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -235,7 +239,7 @@ }static bool -dco_check_option_ce (const struct connection_entry *ce,int msglevel) +dco_check_option_ce (const struct connection_entry *ce,int msglevel,int mode) {if (ce->fragment) {
@@ -264,9 +268,15 @@#endif #if defined(_WIN32) -if (!ce->remote) +if (!proto_is_udp (ce->proto) && mode ==MODE_SERVER ) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on Windows in server mode." ); +return false; + } + +if (!ce->remote && !dco_win_supports_multipeer ()) + { +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -316,7 +326,7 @@const struct connection_list *l = o->connection_list;for (int i =0 ; i < l->len; ++i) { -if (!dco_check_option_ce (l->array[i], msglevel)) +if (!dco_check_option_ce (l->array[i], msglevel, o->mode)) {return false; }
@@ -324,16 +334,16 @@ }else { -if (!dco_check_option_ce (&o->ce, msglevel)) +if (!dco_check_option_ce (&o->ce, msglevel, o->mode)) {return false; } }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer (void ) +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (void ); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
[Openvpn-devel] [PATCH applied] Re: dco-win: enable mode server on supported configuration
Stared at code, test compiled on MinGW/Ubuntu. Looks good, paves the way...
Your patch has been applied to the master branch.
commit 7fac3716a9cb4d0c104d18b4dc939d73736a4ef3
Author: Lev Stipakov Date: Mon Dec 30 20:32:04 2024 +0100
dco-win: enable mode server on supported configuration
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30317.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archivecron2 has uploaded a new patch set (#7) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: dco-win: enable mode server on supported configuration
......................................................................
dco-win: enable mode server on supported configuration
Enable dco-win with mode server if driver supports it.
Disable for proto TCP or older drivers.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30317.html
---
M src/openvpn/dco.c
M src/openvpn/dco_win.c
M src/openvpn/dco_win.h
3 files changed, 27 insertions(+), 7 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/12/812/7
src/openvpn/dco.c +17 -7
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -235,7 +239,7 @@ }static bool -dco_check_option_ce (const struct connection_entry *ce,int msglevel) +dco_check_option_ce (const struct connection_entry *ce,int msglevel,int mode) {if (ce->fragment) {
@@ -264,9 +268,15 @@#endif #if defined(_WIN32) -if (!ce->remote) +if (!proto_is_udp (ce->proto) && mode ==MODE_SERVER ) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on Windows in server mode." ); +return false; + } + +if (!ce->remote && !dco_win_supports_multipeer ()) + { +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -316,7 +326,7 @@const struct connection_list *l = o->connection_list;for (int i =0 ; i < l->len; ++i) { -if (!dco_check_option_ce (l->array[i], msglevel)) +if (!dco_check_option_ce (l->array[i], msglevel, o->mode)) {return false; }
@@ -324,16 +334,16 @@ }else { -if (!dco_check_option_ce (&o->ce, msglevel)) +if (!dco_check_option_ce (&o->ce, msglevel, o->mode)) {return false; } }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer (void ) +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (void ); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 7
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
[Openvpn-devel] [S] Change in openvpn[master]: dco-win: enable mode server on supported configuration
In reply to a message not in the archivecron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/812?usp=email )
Change subject: dco-win: enable mode server on supported configuration
......................................................................
dco-win: enable mode server on supported configuration
Enable dco-win with mode server if driver supports it.
Disable for proto TCP or older drivers.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg30317.html
---
M src/openvpn/dco.c
M src/openvpn/dco_win.c
M src/openvpn/dco_win.h
3 files changed, 27 insertions(+), 7 deletions(-)
src/openvpn/dco.c +17 -7
@@ -43,6 +43,10 @@#include "tun.h" #include "tun_afunix.h" +#if defined(_WIN32) +#include "dco_win.h" +#endif +#ifdef HAVE_LIBCAPNG #include <cap-ng.h> #endif
@@ -235,7 +239,7 @@ }static bool -dco_check_option_ce (const struct connection_entry *ce,int msglevel) +dco_check_option_ce (const struct connection_entry *ce,int msglevel,int mode) {if (ce->fragment) {
@@ -264,9 +268,15 @@#endif #if defined(_WIN32) -if (!ce->remote) +if (!proto_is_udp (ce->proto) && mode ==MODE_SERVER ) { -msg (msglevel,"NOTE: --remote is not defined, disabling data channel offload." ); +msg (msglevel,"NOTE: TCP transport disables data channel offload on Windows in server mode." ); +return false; + } + +if (!ce->remote && !dco_win_supports_multipeer ()) + { +msg (msglevel,"NOTE: --remote is not defined. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }#endif
@@ -316,7 +326,7 @@const struct connection_list *l = o->connection_list;for (int i =0 ; i < l->len; ++i) { -if (!dco_check_option_ce (l->array[i], msglevel)) +if (!dco_check_option_ce (l->array[i], msglevel, o->mode)) {return false; }
@@ -324,16 +334,16 @@ }else { -if (!dco_check_option_ce (&o->ce, msglevel)) +if (!dco_check_option_ce (&o->ce, msglevel, o->mode)) {return false; } }#if defined(_WIN32) -if (o->mode ==MODE_SERVER ) +if ((o->mode ==MODE_SERVER ) && !dco_win_supports_multipeer ()) { -msg (msglevel,"--mode server is set. Disabling Data Channel Offload" ); +msg (msglevel,"--mode server is set. This DCO version doesn't support multipeer. Disabling Data Channel Offload" );return false; }
src/openvpn/dco_win.c +7 -0
@@ -523,4 +523,11 @@ } } +bool +dco_win_supports_multipeer (void ) +{ +OVPN_VERSION ver = {0 }; +return dco_get_version (&ver) && ver.Major >=2 ; +} +#endif /* defined(_WIN32) */
src/openvpn/dco_win.h +3 -0
@@ -48,6 +48,9 @@void dco_start_tun (struct tuntap *tt); +bool +dco_win_supports_multipeer (void ); +#else /* if defined(ENABLE_DCO) && defined(_WIN32) */ static inline void
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/812?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Iea4538cee075d50de836d1ef7652985186b2527c
Gerrit-Change-Number: 812
Gerrit-PatchSet: 7
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged